<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>易居</title>
    <link rel="stylesheet" href="../css/zlh_bootstrap.min.css">
    <link rel="stylesheet" href="../css/zlh_main.css">
    <style>
    </style>
</head>


<script type="text/javascript">
    function fun() {
        alert("sdasdadasdasdsa");
        var a  = "[[${news.content}]]";
        var b=a.value;
        alert("sdasdasd");
        a.value=b.replace(/\n/g,"<br/>");
        document.getElementById("content").innerHTML(a.toString());
    }
</script>

<body onload="fun()">

<!--引入导航栏-->
<nav th:replace="~{topbar::top}"></nav>

<div class="container">
    <div class="row">
        <div class="container">
            <div class="col-md-12">
                <div class="col-md-8 col-md-offset-1">
                    <h1 class="news-title" th:text="${news.title}">
                        2年前他为教育事业和高圆圆分手，今成这般，高圆圆：我有一句MMP如鲠在喉
                    </h1>
                    <div class="news-status">
                        <div class="label label-default"  th:text="${news.type}">教育</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="container">
            <div class="col-md-12">
                <div class="col-md-8 col-md-offset-1">
                    <div class="news-content">
                        <div id="content" style="white-space: pre-wrap;" th:text="${news.content}">
                            Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio et nam natus non obcaecati
                            odit ratione vel. Adipisci, aperiam at culpa fugiat laborum modi praesentium quaerat sequi soluta
                            tempora voluptas.

                        </div>
                    </div>
                </div>
                <div class="col-md-3 ">
                    <div class="side-bar-card">
                        <div class="card-title">易居新闻</div>
                        <div class="card-body">
                            <div class="list">
                                <div class="item">
                                    <div class="title"  >
                                        <a href="#" th:text="${pageDTO.result[0].title}" th:href="@{'/news_content?newsId='+${pageDTO.result[0].newsId}}">
                                        </a>
                                    </div>
                                </div>
                                <div class="item">
                                    <div class="title">
                                        <a href="#" th:text="${pageDTO.result[1].title}" th:href="@{'/news_content?newsId='+${pageDTO.result[1].newsId}}">
                                        </a>
                                    </div>
                                </div>
                                <div class="item">
                                    <div class="title">
                                        <a href="#" th:text="${pageDTO.result[2].title}" th:href="@{'/news_content?newsId='+${pageDTO.result[2].newsId}}">
                                        </a>
                                    </div>
                                </div>
                                <div class="item">
                                    <div class="title">
                                        <a href="#" th:text="${pageDTO.result[3].title}" th:href="@{'/news_content?newsId='+${pageDTO.result[3].newsId}}">
                                        </a>
                                    </div>
                                </div>
                                <div class="item">
                                    <div class="title">
                                        <a href="#" th:text="${pageDTO.result[4].title}" th:href="@{'/news_content?newsId='+${pageDTO.result[4].newsId}}">
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
        </div>
    </div>
</div>
</div>
</div>

<div class="footer">© 2017 易居网 中国互联网举报中心京ICP证1401号京ICP备125439号-3京公网安备
</div>
<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>
